package com.gameseer.killua;

import android.os.Bundle;
import android.util.Log;
import android.app.Activity;



import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.ActionBar.Tab;

import com.actionbarsherlock.app.SherlockActivity;


import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;



public class MainActivity extends SherlockActivity {
	public static int THEME = R.style.Theme_Sherlock;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		setTheme(THEME); //Used for theme switching in samples
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		Log.i("killua", "onCreate");
	}

	 @Override
	    public void onResume(){
	    	Log.d("killua", "onResume");
	    	super.onResume();
	    }
	 
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		//Used to put dark icons on light action bar
        boolean isLight = THEME == R.style.Theme_Sherlock_Light;

        menu.add("Save")
            .setIcon(isLight ? R.drawable.ic_compose_inverse : R.drawable.ic_compose)
            .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);

        menu.add("Search")
            .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);

        menu.add("Refresh")
            .setIcon(isLight ? R.drawable.ic_refresh_inverse : R.drawable.ic_refresh)
            .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);

        return true;
	}

}
